package com.study.demoservice.controller;

import com.study.demoservice.bean.Student;
import com.study.demoservice.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author chenyeqing
 */
@RestController
@RequestMapping("autowired")
public class AutowiredController {

    @Autowired
    @Qualifier("SQLServerServiceImpl")
    public DataService dataService;

    @RequestMapping("delete/{id}")
    public Student delete(@PathVariable("id") String id) {
        return dataService.deleteStudent(id);
    }

}
